#pragma once

#include<iostream>
#include<vector>
#include<functional>

using task_t = std::function<void()>;

void Download()
{
    std::cout << "子进程接受了下载任务" << std::endl;
}

void Mysql()
{
    std::cout << "子进程接受了数据库任务" << std::endl;
}

void System()
{
    std::cout << "子进程接受了系统任务" << std::endl;
}

void Log()
{
    std::cout << "子进程接受了日志任务" << std::endl;
}

std::vector<task_t> tasks;

class Init
{
public:
    Init()
    {
        tasks.push_back(Download);
        tasks.push_back(Mysql);
        tasks.push_back(System);
        tasks.push_back(Log);
    }
};

Init ginit;